#pragma once
#include<iostream>
#include<cstdlib>
#include<cassert>
using std::cout;
using std::cin;
using std::endl;
class ListN
{
public:
	int val;
	ListN* next;
};
class List
{
public:
	List()
	{
		head = nullptr;
	}
	void ListPush(int x);
	void print()
	{
		ListN* cur = head;
		while (cur)
		{
			cout << cur->val << "->";
			cur = cur->next;
		}
		cout << endl;
	}
private:
	ListN* head;
};